<?php
/*
 * OrangeHRM is a comprehensive Human Resource Management (HRM) System that captures
 * all the essential functionalities required for any enterprise.
 * Copyright (C) 2006 OrangeHRM Inc., http://www.orangehrm.com
 *
 * OrangeHRM is free software; you can redistribute it and/or modify it under the terms of
 * the GNU General Public License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * OrangeHRM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with this program;
 * if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA  02110-1301, USA
 */
$styleSheet = "orange";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script type="text/javascript" src="../../scripts/archive.js"></script>
<script type="text/javascript" src="../../scripts/time.js"></script>

<link href="../../themes/<?php echo $styleSheet;?>/css/leave.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../themes/<?php echo $styleSheet;?>/scripts/style.js"></script>
<link href="../../themes/<?php echo $styleSheet;?>/css/style.css" rel="stylesheet" type="text/css"/>
<!--[if lte IE 6]>
<link href="../../themes/<?php echo $styleSheet; ?>/css/IE6_style.css" rel="stylesheet" type="text/css"/>
<![endif]-->
<!--[if IE]>
<link href="../../themes/<?php echo $styleSheet; ?>/css/IE_style.css" rel="stylesheet" type="text/css"/>
<![endif]-->
</head>
<body class="yui-skin-sam">

<div class="outerbox">
    <div class="outerbox"><div class="top"><div class="left"></div><div class="right"></div><div class="middle"></div></div><div class="maincontent" style="height:600px;">
        <div class="mainHeading"><h2>事件提醒</h2></div>

    
   <div class="actionbar">
        <div class="actionbuttons">
        	           
                         
        </div>
        <div class="noresultsbar"></div>
        <div class="pagingbar"></div>
    <br class="clear">
    <h3 style='text-align:center;'><?php echo @date('Y年n月',time());?>排班表</h3>
    <table cellspacing="0" cellpadding="0" class="data-table"  border="1">
					<thead>
					<tr>
						<td scope="col" align="center" width="30px;">月份</td>
						<td scope="col" width="30px;">班次</td>
						<td scope='col' style='text-align:center;'>1</td>
						<td scope='col' style='text-align:center;'>2</td>
						<td scope='col' style='text-align:center;'>3</td>
						<td scope='col' style='text-align:center;'>4</td>
						<td scope='col' style='text-align:center;'>5</td>
						<td scope='col' style='text-align:center;'>6</td>
						<td scope='col' style='text-align:center;'>7</td>
						<td scope='col' style='text-align:center;'>8</td>
						<td scope='col' style='text-align:center;'>9</td>
						<td scope='col' style='text-align:center;'>10</td>
						<td scope='col' style='text-align:center;'>11</td>
						<td scope='col' style='text-align:center;'>12</td>
						<td scope='col' style='text-align:center;'>13</td>
						<td scope='col' style='text-align:center;'>14</td>
						<td scope='col' style='text-align:center;'>15</td>
						<td scope='col' style='text-align:center;'>16</td>
						<td scope='col' style='text-align:center;'>17</td>
						<td scope='col' style='text-align:center;'>18</td>
						<td scope='col' style='text-align:center;'>19</td>
						<td scope='col' style='text-align:center;'>20</td>
						<td scope='col' style='text-align:center;'>21</td>
						<td scope='col' style='text-align:center;'>22</td>
						<td scope='col' style='text-align:center;'>23</td>
						<td scope='col' style='text-align:center;'>24</td>
						<td scope='col' style='text-align:center;'>25</td>
						<td scope='col' style='text-align:center;'>26</td>
						<td scope='col' style='text-align:center;'>27</td>
						<td scope='col' style='text-align:center;'>28</td>
						<td scope='col' style='text-align:center;'>29</td>
						<td scope='col' style='text-align:center;'>30</td>
						<td scope='col' style='text-align:center;'>31</td>					
						</tr>
					</thead>

					<tbody>

	
    <?php 
    
    if(is_array($records['argclass']) && count($records['argclass']) > 0){
		$argclass = array();
    	$argclass =$records['argclass']['list'];
    	foreach($argclass as $key=>$v){
			echo "<tr>";
			echo "<td scope=\"col\" align=\"center\" width=\"30px;\">".@date('n',time())."月</td>";
    		echo "<td scope=\"col\" width=\"30px;\">".$key."班</td>";
    		foreach($v[@date('n',time())] as $k=> $j){
				if($k == @date('d',time()) ){
    				echo "<td scope='col' style='text-align:center;background-color:#CCFF66;color:red;'>".$j."</td>";
    			}else{
    				echo "<td scope='col' style='text-align:center;'>".$j."</td>";
    			}
    		}
    		echo "</tr>";
    	}
    }else{
    	echo "<tr><td colspan=\"33\" style='text-align:center;font-size:14px;'>本月排班还没出来！</td></tr>";
    }
    ?>
    	</tbody>
	</table>
    
    <table cellspacing="0" cellpadding="0" style="margin:20px 0px ;width:100%; " class="data-table">
    
    <tr style=" background-color:#FAD163;height:28px;"><th>审批类型</th><th>审批数目</th><th>操作</th></tr>
    <?php
	$reslut = $records['list'];
	if(is_array($reslut) && count($reslut)>0){
		foreach($reslut as $key => $val){
			if(!empty($val['name'])){
				echo "<tr style=\"height:28px;\"><td style=\"border-bottom: solid 1px #CCCCCC;padding-left:10px;font-weight:bold;\">".$val['name']."</td><td style=\"border-bottom: solid 1px #CCCCCC;\"><font color=red>".(empty($val['total']) ? 0 : $val['total'])."</font>条审批</td><td <td style=\"border-bottom: solid 1px #CCCCCC;\">".(empty($val['total']) ? "" : "[<a  style=\"color:#FF0000;\" href=\"CentralController.php?oacode=oamange&action=approvallog&TypeId=".$val['TypeId']."\">点击查看审批</a>]")."&nbsp;<a href=\"CentralController.php?oacode=oamange&action=attend&TypeId=".$val['TypeId']."\">查看记录</a></td></tr>";
			}
		}
	}

	
	echo "<tr style=\"height:28px;\"><td style=\"padding-left:10px;font-weight:bold;\">其他OA审批</td><td><font color=red>".(empty($records['total']) ? 0 : $records['total'])."</font>条审批</td><td>".(empty($records['total']) ? "" : "[<a style=\"color:#FF0000;\" href=\"CentralController.php?oacode=oamange&action=def\">点击查看审批</a>]")."&nbsp;<a href=\"CentralController.php?oacode=oamange&action=defapprovallog\">查看记录</a></td></tr>";
	
	echo "<tr style=\"height:28px;\"><td style=\"padding-left:10px;font-weight:bold;\">员工合同</td><td>有<font color=red>".(empty($records['hetong']) ? 0 : $records['hetong'])."</font>人合同即将到期或者已经过期还没处理</td><td>[<a style=\"color:#FF0000;\" href=\"CentralController.php?oacode=oamange&action=contract\">点击查看</a>] ，同时通知相关人员进行处理</td></tr>";
	?>
    </table>
    
    </div>
    <br class="clear">

  </div><div class="bottom"><div class="left"></div><div class="right"></div><div class="middle"></div></div></div>
</div>



</body>
</html>
